<template>
    <div>
        <div>登录中...</div>
    </div>
</template>

<script>
    import {mapGetters} from "vuex";
    import {getIdmAuthoCodeUrl} from "@/api/user.js";

    export default {
        name: "index",
        data () {
            return {
                loginForm: {
                    username: "admin",
                    password: "111111a",
                    code: "",
                    redomStr: ""
                }
            };
        },
        created () {
            console.log(this.$router)
            console.log(this.tagWel)
            getIdmAuthoCodeUrl().then(res => {
                if(res.code == 200){
                    alert(res.data);
                    window.location.href = res.data;
                }
            })
            // window.location.href = 'https://www.baidu.com'
            // window.location.href = 'http://localhost:1888/signOn'
            // this.$store.dispatch("LoginByUsername", this.loginForm).then((res) => {
            //     this.$router.push({ path: this.tagWel.value });
            //     this.$store.dispatch("getDictionry")
            // }).catch(err=>{
            //     console.log(err)
            // });
        },
        mounted () { },
        computed: {
            ...mapGetters(["tagWel"])
        },
        props: [],
        methods: {
        }
    }
</script>

<style scoped>

</style>